package com.jili.interface_;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 *  ClassName: InterfaceDemo
 *  Package com.jili.interface_
 *  Description:
 *  @Author: 廖继礼
 *  @Create: 2025/3/20
 *  @Version: v1.0
 *
 */
public class InterfaceDemo {
    public static void main(String[] args) {
        MyInterface myInterface = Integer::sum;
        int sum = myInterface.sum(1, 2);
        System.out.println(sum);
        List<String> list = Arrays.asList("Alice", "Bob", "David");
        Collections.sort(list, Comparator.reverseOrder());
        System.out.println("list = " + list);
    }
}
